package com.openweixin.sheknows.util;

import java.sql.Connection;
import java.sql.DriverManager;

public class JdbcUtil {
	public static void main(String[] args) throws Exception {
		Class.forName("com.mysql.jdbc.Driver");
		Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/sheknows", "root", "root");
		
		con.setAutoCommit(true);
		int count = con.prepareStatement("insert into user (username,groupid) values ('lucy',1)").executeUpdate();
		System.out.println(count);
		con.close();
	}
}
